home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
Recent1
/
DiskMaster21d.lha
/
DiskMasterII
/
rexx
/
DM-Vir.DM
< prev
next >
Wrap
Text File
|
1996-08-13
|
3KB
|
135 lines
/*
** $VER: DM-Vir.DM 1.1 (13.08.96) (c) Inorix Scripts
**
** Intelligent Viruskiller script for DiskMaster II.
** It will check for running Virus_Checker v7.18+ or VirusZ II v1.33+.
** If neither is running, it will start one.
*/
OPTIONS RESULTS
/****************************/
/* Add RexxReqTools if */
/* necessary. */
/****************************/
IF ~SHOW('L','rexxreqtools.library') THEN DO
ADDLIB('rexxreqtools.library',0,-30)
END
IF ~SHOW('L','rexxtricks.library') THEN DO
ADDLIB('rexxtricks.library',0,-30)
END
/****************************/
/* Get the right DM to talk */
/* to (and the right screen)*/
/****************************/
Port=ADDRESS()
/****************************/
/* Select Viruskiller to */
/* run if none found. */
/****************************/
Killer='DH0:VirusKillers/VirusZ'
ktiep='VZ'
/****************************/
/* Set some variables to */
/* make life easier :-) */
/****************************/
NL='0a'x
Title='DM-Vir v1.1'
Tag="rtez_flags=ezreqf_centertext rt_reqpos=reqpos_centerscr rt_pubscrname="||port
/****************************/
/* Get file to check */
/****************************/
PARSE ARG DMpath
/****************************/
/* Check if VC is running */
/****************************/
tiep='VZ'
IF ~SHOW('PORTS','VIRUSZ_II.REXX') THEN DO
tiep='VC'
IF ~SHOW('PORTS','Virus_Checker') THEN DO
CALL FireUp
END
END
SELECT
WHEN tiep='VC' THEN DO
ADDRESS 'Virus_Checker'
'scan' DMpath
ADDRESS VALUE Port
IF VCHECK.0.0=0 THEN CALL Okidook
ELSE DO
FileBit=FILEPART(VCHECK.1.1)
Messie=VCHECK.1.2
CALL NotOK
END
END
WHEN tiep='VZ' THEN DO
ADDRESS 'VIRUSZ_II.REXX'
'CHECKFILE 'DMPath' DECREXEC DECRDATA EXTRACT'
SELECT
WHEN RC=0 THEN CALL Okidook
WHEN RC=5 THEN DO
FileBit=FILEPART(DMPath)
Messie='A virus'
CALL NotOK
END
OTHERWISE DO
CALL SomeFault
END
END
END
OTHERWISE DO
NOP
END
END
keuze=rtezrequest(Showtext,Gadgets,Title,Tag,)
IF (keuze=1 & beet~=0) THEN DO
sure=rtezrequest('Are you sure you want to delete:'NL||DMPath,'_No|_Yes',Title,Tag,)
IF sure=0 THEN DO
'delete 'DMPath
END
END
EXIT
Okidook:
ShowText='File OK'
Gadgets="_OK|O_K"
beet=0
RETURN
NotOK:
Gadgets='_Delete|_Quit'
ShowText='>>>> ALERT <<<<'
ShowText=ShowText||NL||FileBit
ShowText=ShowText||NL||'contains 'Messie
beet=1
RETURN
SomeFault:
ShowText='Something went wrong!'NL'File NOT checked!'
Gadgets="_OK|O_K"
beet=0
RETURN
FireUp:
ADDRESS COMMAND 'Run 'Killer 'CX_POPUP=NO'
DO 5 WHILE ~SHOW('PORTS','VIRUSZ_II.REXX')
ADDRESS COMMAND 'WAITFORPORT VIRUSZ_II.REXX'
END
tiep=ktiep
RETURN